import { useRoutes } from "react-router-dom";
import Login from '../pages/login';
import Home from "../pages/home";
import VisitorList from '../pages/visitors/visitorList'
import VisitorAdd from "../pages/visitors/VisitorAdd";
const Routes = () => {
    return useRoutes([
        {
            path: '/',
            element: <Login />
        },
        {
            path: '/Home',
            element: <Home />,
            children: [
                // {
                //     // path: '', // index属性
                //     index: true,
                //     element: <Home />
                //   },
                {
                    path: 'VisitorList',
                    element: <VisitorList />
                },
                {
                    path: 'VisitorAdd',
                    element: <VisitorAdd />
                },
                
            ]
        }
    ])
}
export default Routes;